import request from "../../utils/request";

const BASE_URL = "maimao_goods/goods/brand";
export default {

    /**
     * 热门品牌
     */
    hotBrand() {
        return request({
            url: `${BASE_URL}/hot`,
            method: 'get',
        })
    },

    /**
     * 查询三级分类下的品牌
     * @param cid3
     * @returns {AxiosPromise}
     */
    cateBrand(cid3) {
        return request({
            url: `${BASE_URL}/cateBrand?cid=${cid3}`,
            method: 'get'
        })
    },

    list() {
        return request({
            url: `${BASE_URL}/list`,
            method: 'get'
        })
    },

    /**
     * 查询当前商家已申请的品牌和品牌已绑定的分类信息
     */
    fetchBrandCateData() {
        return request({
            url: `${BASE_URL}/shopBrandCate`,
            method: 'get'
        })
    },

    /**
     * 给品牌绑定分类
     */
    brandBindCate(input) {
        return request({
            url: `${BASE_URL}/brandBindCate`,
            method: 'post',
            data: input
        })
    },

    applyBrand(data){
        return request({
            url: `${BASE_URL}/add`,
            method: 'post',
            data: data
        })
    }


}

